package com.yangj.entity;

import com.thoughtworks.xstream.annotations.*;
import java.util.*;

@XStreamAlias("xml")
public class NewsMessage extends BaseMessage
{
    @XStreamAlias("ArticleCount")
    private String articleCount;
    @XStreamAlias("Articles")
    private List<Article> articles;
    
    public List<Article> getArtiles() {
        return this.articles;
    }
    
    public void setArtiles(final List<Article> articles) {
        this.articles = articles;
    }
    
    public String getArticleCount() {
        return this.articleCount;
    }
    
    public void setArticleCount(final String articleCount) {
        this.articleCount = articleCount;
    }
    
    public NewsMessage(final Map<String, String> requestMap, final List<Article> articles) {
        super(requestMap);
        this.articles = new ArrayList<Article>();
        this.setMsgType("news");
        this.articles = articles;
        this.articleCount = new StringBuilder(String.valueOf(articles.size())).toString();
    }
}
